package de.eventdroid;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class SplashScreen extends Activity {

	
	/**
	 * Initialisation of Variables for running the splashscreen
	 */
	private final int SPLASH_DURATION= 3000;
	
    /**
     * Constructing method which run on creation of the Activity
     */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.eventdroid_splash_screen);
		
		/* Handler to start the Menu-Activity
         * and close this Splash-Screen after pre defined seconds.*/
        new Handler().postDelayed(new Runnable(){
                public void run() {
                        /* Intent is created for the StartScreen */
                        Intent mainIntent = new Intent(SplashScreen.this,StartScreen.class);
                        SplashScreen.this.startActivity(mainIntent);
                        SplashScreen.this.finish();
                }

        }, SPLASH_DURATION);
		
        
	}	
	
    
}
